﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using UIGenDemoModel;
using HasuSLLib;

namespace UIGenDemo
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
            Loaded += new RoutedEventHandler(MainPage_Loaded);
        }

        void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            Employee emp = new Employee();
            emp.EmpName = "test";
            emp.EmpNo = 100;
            emp.DOJ = new Date() { Value= DateTime.Now };
            emp.Dob = new DateTime(1980, 1, 1);
            emp.EmpType = EmpType.Permanent;
            emp.Addr1 = "test addr1";
            emp.Addr2 = "test addr2";
            emp.Addr3 = "Town";
            emp.Postcode = "AB1 2CD";
            emp.Active = true;
            emp.Country.Key = "UK";
            hsl.DataContext = emp;
            
        }
    }
}
